package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Petproduct;
import com.pets.springboot_petshop.mapper.PetproductMapper;
import com.pets.springboot_petshop.service.PetproductServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/22 上午2:26 周二
 * @Description: 宠物活体商品实现类
 */
@Service
public class PetproductServicesImpl implements PetproductServices {
    @Autowired
    private PetproductMapper petproductMapper;

    @Override
    public Petproduct select(int id) {
        return petproductMapper.select(id);
    }

    @Override
    public List<Petproduct> selectuser_id(int user_id) {
        return petproductMapper.selectuser_id(user_id);
    }

    @Override
    public List<Petproduct> selectpettype_id(int pettype_id) {
        return petproductMapper.selectpettype_id(pettype_id);
    }

    @Override
    public List<Petproduct> findAll() {
        return petproductMapper.findAll();
    }

    @Override
    public int add(Petproduct petproduct) {
        return petproductMapper.add(petproduct);
    }

    @Override
    public int delete(int id) {
        return petproductMapper.delete(id);
    }

    @Override
    public int update(Petproduct petproduct) {
        return petproductMapper.update(petproduct);
    }

    @Override
    public int updateuser_id(Petproduct petproduct) {
        return petproductMapper.updateuser_id(petproduct);
    }

    @Override
    public List<Petproduct> selectname(String name) {
        return petproductMapper.selectname(name);
    }
}
